package net.misp.beta.nomilog.parts;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;

public class MapPinOverlay extends ItemizedOverlay<OverlayItem> {
	
	Drawable mDrawable;
	ArrayList<GeoPoint> mDataList;

	public MapPinOverlay(Drawable arg0) {
		super(arg0);
		mDrawable=arg0;
	}

	public void setPin(ArrayList<GeoPoint> dataList) {
		mDataList=dataList;
	}

	@Override
	protected OverlayItem createItem(int i) {
		OverlayItem item=new OverlayItem(mDataList.get(i), "title", "snippet");
		return item;
	}

	@Override
	public int size() {
		return mDataList.size();
	}
	
	@Override
	public boolean onTap(GeoPoint p, MapView mapView) {
		// TODO Auto-generated method stub
		return super.onTap(p, mapView);
	}

}
